﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="RequisicaoOpcoes.aspx.cs" Inherits="welwitschia.Requisicoes.RequisicaoOpcoes" %>

<%@ Register Assembly="SandTrap.WebControls" Namespace="SandTrap.WebControls" TagPrefix="st" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
          <div id="Div1" class="info">
            <h2>Constituição da refeição</h2>
        <div></div>
        </div>
         
    <asp:ListView runat="server" ID="lvOpcoes" 
                OnItemDeleting="lvOpcoes_ItemDeleting" OnItemEditing="lvOpcoes_ItemEditing"
                OnItemCommand="lvOpcoes_ItemCommand" 
              ondatabinding="lvOpcoes_DataBinding" ondatabound="lvOpcoes_DataBound">
                <LayoutTemplate>
                    <table runat="server" id="table1">
                        <tr runat="server" id="itemPlaceholder">
                        </tr>
                    </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr id="Tr1" runat="server">
                        <td id="Td1" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lblUnidade" runat="server" Text='<%#Eval("TipoOpcao.Descricao") %>' />
                        </td>
                        <td id="Td2" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:TextBox ID="txtDescricao" CssClass="required" TextMode="MultiLine" Rows="4" Width="400" runat="server" 
                                Text='<%#Eval("Descricao") %>' />
                            
                        </td>
                        
                    </tr>
                </ItemTemplate>
            </asp:ListView>
            <br/><br/>
              <div id="header" class="info">
            <h2>Previsão de refeições servidas</h2>
        <div></div>
        </div>
            
        <asp:ListView runat="server" ID="lvVendas" 
                OnItemDeleting="lvVendas_ItemDeleting" OnItemEditing="lvVendas_ItemEditing"
                OnItemCommand="lvVendas_ItemCommand">
                <LayoutTemplate>
                   <table runat="server" class="grd2" id="table1">
                         <thead>
                     <tr class="ghdr2">
                            <td>
                                Unidade
                            </td>
                            <td>
                                Serviço
                            </td>
                            <td>
                                Preço
                            </td>
                            <td>
                                Quantidade de refeições
                            </td>
                        </tr>
                        </thead>
                            <tr runat="server" id="itemPlaceholder">
                            </tr>
                        </table>
                </LayoutTemplate>
                <ItemTemplate>
                    <tr id="Tr1" runat="server">
                        <td id="Td1" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:HiddenField ID="lvhfIdUnidade" runat="server" Value='<%#Eval("Unidade.IdUnidade") %>' />
                            <asp:Label ID="lblUnidade" runat="server" Text='<%#Eval("Unidade.Designacao") %>' />
                        </td>
                        <td id="Td4" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lblServico" runat="server" Text='<%#Eval("DescricaoTipoServico") %>' />
                        </td>
                        <td id="Td5" runat="server">
                            <%-- Data-bound content. --%>
                            <asp:Label ID="lblPreco" runat="server" Text='<%#Eval("PrecoRefeicao") %>' />
                        </td> 
                        <td id="Td3" runat="server">
                            <%-- Data-bound content. --%>
                            <st:NumberBox ID="nbRefeicoesPrevistas"  CssClass="required number" runat="server" Amount='<%#Eval("RefeicoesPrevistas")%>'  />

                        </td>
                    </tr>
                </ItemTemplate>
            </asp:ListView>
            
            <asp:Button ID="btnContinuar" runat="server" Text="Continuar" 
        onclick="btnContinuar_Click" />
            <asp:Button ID="btnVoltar" runat="server" Text="Voltar" 
        onclick="btnVoltar_Click" />

        <asp:HiddenField ID="hfIdRefeicaoContratada" runat="server" />
        <asp:HiddenField ID="hfData" runat="server" />
        <asp:HiddenField ID="hfIdUnidade" runat="server" />
        <asp:HiddenField ID="hfNumeroRequisicao" runat="server" />
</asp:Content>
